import request from '@/utils/request'

// 获取历史地震灾害数据列表
export function getEarthquakeDisaster(query) {
  return request({
    url: '/fxfzypg/baseData/getAllEarthquakeDisaster',
    method: 'get',
    params: query
  })
}

// 查询历史地震灾害数据详细
export function detailEarthquakeDisaster(id) {
  return request({
    url: '/fxfzypg/baseData/getEarthquakeDisasterId/' + id,
    method: 'get'
  })
}

// 新增历史地震灾害数据
export function addEarthquakeDisaster(data) {
  return request({
    url: '/fxfzypg/baseData/saveEarthquakeDisaster',
    method: 'post',
    data: data
  })
}

// 修改历史地震灾害数据
export function updateEarthquakeDisaster(data) {
  return request({
    url: '/fxfzypg/baseData/updateEarthquakeDisaster',
    method: 'post',
    data: data
  })
}

// 删除历史地震灾害数据
export function delEarthquakeDisaster(id) {
  return request({
    url: '/fxfzypg/baseData/deleteEarthquakeDisaster/' + id,
    method: 'post'
  })
}

// 是否国家管理员
export function isCouAdmin() {
  return request({
    url: `/historicalSeismicData/isCouAdmin`,
    method: 'get'
  })
}